/**
 * LineStyle. 
 * by Alvaro Lopez and Juan Baquero
 * 
 *Put your VYM files inside the Scketch folder.
 *Press the arrow keys or click the nodes for surfing the map .
 *Check the LINE STYLE section.
 */

import remixlab.remixvym.*;
import remixlab.remixvym.core.graphics.*;
import remixlab.remixvym.core.graphics.link.*;
import remixlab.remixvym.core.graphics.node.*;


void setup() {
  size(800,600,P2D);
  map = new MindMap();
  PXMLReader xml = new PXMLReader(this);
  //Load the XML file created from VYM.
  map.create("Example-line-style.xml", xml);

  // Object style creation
  style = new StyleGraph();
  //Control de map size with the size parameters
  graph = new SceneMindMap(this,style); //DEFAULT JAVA2D

  //Default remixlab mode
  style.initDeafult(this);

  //Node shape controls		
  style.addNodeStyle(new RectNode());
  style.addNodeStyle(new OvalNode());
  style.addNodeStyle(new NoneNode());

  //LINE STYLE:  
  //Set the default map link style using the following controls.
  //Change the shape in the sketch pressing the 'L' button.
  //Comment the styles that you don't want to use.
  style.addLinkStyle(new TriangleLink(1));
  style.addLinkStyle(new LineLink());
  style.addLinkStyle(new OvalLink());
  style.addLinkStyle(new ElbowLink());

  graph.setMap(map);
}

void draw() {
  graph.paint();
}

SceneMindMap graph;
MindMap map;
StyleGraph style;



